package com.mxx.pmxt.dao;

import com.mxx.pmxt.model.GoodsModel;
import com.mxx.pmxt.model.UserGoodsModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface UserGoodsModelMapper {
    int deleteByPrimaryKey(Integer ugid);

    int insert(UserGoodsModel record);

    int insertSelective(UserGoodsModel record);

    UserGoodsModel selectByPrimaryKey(Integer ugid);

    int updateByPrimaryKeySelective(UserGoodsModel record);

    int updateByPrimaryKey(UserGoodsModel record);

    BigDecimal selectMaxPriceByGid(@Param("gid") int gid);

    List<UserGoodsModel> selectMaxPrice(@Param("maxPrice") BigDecimal maxPrice,@Param("gid") int gid);

    List<UserGoodsModel> selectIsGetByUserByPage(@Param("startRow")int startRow, @Param("pageSize")int pageSize, @Param("uname")String uname);

    int countSelectIsGetByUserByPage(@Param("uname")String uname);

    List<UserGoodsModel> selectByGidState(@Param("gid") int gid,@Param("pisget")int pisget);

    BigDecimal selectMaxPriceByGidUser(@Param("gid")int gid,@Param("puser")String puser);

    int countByGid(@Param("gid") int gid);

    List<String> selectUsersExMaxMin(@Param("umax")String umax,@Param("gid")int gid,@Param("umin")String umin);

}